package 周六;



import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="王五";
        int age=16;
        String gender="男";
        String[] otherInfo={"吃饭","睡觉"};
        Student ww=new Student(name,age,gender,otherInfo);
        FileOutputStream fos=new FileOutputStream("222.txt");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(ww);
        oos.close();

    }



}
